<?php
$this->load->helper('form');
$attributes = array('onsubmit' => 'pkgEditRequest('.$pkg_id.'); return false;');
echo form_open('#',$attributes);
?>
<table>
	<tr>
		<td class='form-field'> <strong> Name :</strong></td>
		<td><?php
		$data = array(
		              'name'        => 'name',
		              'id'          => 'name',
		              'maxlength'   => '50',
		              'size'        => '50',
		              'value'		=> $name
		            );
		echo form_input($data);
		?>
		</td>
	</tr>
	
	<tr>
		<td class='form-field'> <strong> Website :</strong></td>
		<td><?php
		$data = array(
		              'name'        => 'website',
		              'id'          => 'website',
		              'maxlength'   => '150',
		              'size'        => '50',
		              'value'		=> $website
		            );
		echo form_input($data);
		?>
		</td>
	</tr>
		
	<tr>
		<td class='form-field'> <strong> Licence :</strong></td>
		<td><?php
		$data = array(
		              'name'        => 'licence',
		              'id'          => 'licence',
		              'maxlength'   => '30',
		              'size'        => '30',
		              'value'		=> $licence
		            );
		echo form_input($data);
		?>
		</td>
	</tr>
	
	<tr>
		<td class='form-field'> <strong> Category :</strong></td>
		<td><?php
		$options = array();
		foreach ($categories as $value)
			$options[$value] = $value;
        
        $data = array(
		              'name'        => 'radio-cat',
		              'id'          => 'rad-catlist',
		              'value'       => 'rad-catlist',
		              'checked'     => TRUE
            );

		echo form_radio($data).' ';
		echo form_dropdown('category-list', $options, $category, 'id="category-list" onfocus="$(\'rad-catlist\').checked = true;"').' ';
		
		$data['id'] = $data['value'] = 'rad-catnew';
		$data['checked'] = FALSE;
		echo form_radio($data).' ';
		
		$data = array(
		              'name'        => 'category-new',
		              'id'          => 'category-new',
		              'maxlength'   => '30',
		              'size'        => '30',
		              'value'		=> $category,
					  'onfocus'     => '$(\'rad-catnew\').checked = true;'
		            );
		echo form_input($data);
		
		?>
		</td>
	</tr>
	
	<tr>
		<td class='form-field'> <strong> Short description :</strong></td>
		<td><?php
		$data = array(
		              'name'        => 'short_desc',
		              'id'          => 'short_desc',
		              'rows'		=> '10',
		              'cols'        => '30',
		              'value'		=> $short_desc
		            );
		echo form_textarea($data);
		?>
		</td>
	</tr>
	
	<tr>
		<td class='form-field'> <strong> Status :</strong></td>
		<td><?php
		$options = array('active' => 'active', 'deprecated' => 'deprecated');
		echo form_dropdown('status', $options, 'active', 'id="status"');
		?>
		</td>
	</tr>
	<tr>
		<td class='form-field'>
			<?php echo form_submit('submit', 'Send'); ?>
		</td>
	</tr>
</table>
<?php
echo form_close('');
?>